<?php echo $this->element('menu'); ?>
<div class="worthlessShares index" style="width:1650px;">
    <?php echo $this->element('ws_menu'); ?>
    <table cellpadding="0" cellspacing="0" width="100%">
        <tr>            
            <th style="width:50px">Action</th>
            <th style="width:86px;text-align: right;"><?php echo $this->Paginator->sort('Date'); ?></th>
            <th style="width:70px;text-align: right;"><?php echo $this->Paginator->sort('LineNo'); ?></th>
            <th style="width:97px;text-align: right;"><?php echo $this->Paginator->sort('CommonID'); ?></th>
            <th style="width:80px"><?php echo $this->Paginator->sort('OrderNo'); ?></th>
            <th style="width:80px"><?php echo $this->Paginator->sort('ParcelType'); ?></th>
            <th style="width:308px;text-align: left;"><?php echo $this->Paginator->sort('RegdName1'); ?></th>			
            <th style="width:304px"><?php echo $this->Paginator->sort('CompanyName'); ?></th>
            <th style="text-align: right; width: 128px;"><?php echo $this->Paginator->sort('DateDocRecd'); ?></th>
            <th style="width: 111px;"><?php echo $this->Paginator->sort('DateForConv'); ?></th>
            <th style="width: 109px; padding-right: 0pt;"><?php echo $this->Paginator->sort('DateForRego'); ?></th>
            <th style=""><?php echo $this->Paginator->sort('Registry'); ?></th>
            <th style=""><?php echo $this->Paginator->sort('Action'); ?></th>
            <th style=""><?php echo $this->Paginator->sort('Status'); ?></th>			
        </tr>
        <?php
        $i = 0;
        foreach ($worthlessShares as $worthlessShare):
		//print_r($worthlessShare);exit;
            $class = null;
            if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
            }
            ?>
            <tr<?php echo $class; ?>>
                <td colspan="14">
                    <?php echo $this->Form->create('WorthlessShare',array('action'=>'edit/'.$worthlessShare['WorthlessShare']['LineNo']));
                    echo $this->Form->input('LineNo', array("type"=>"hidden","value"=>$worthlessShare['WorthlessShare']['LineNo']));
                    ?>
                    <table cellpadding="0" cellspacing="0" style="float:right;width:1598px">
                        <tr style="height:25px;">
                            <td style="border:0;width:90px;text-align: right;"><?php echo date("d/m/Y", $worthlessShare['WorthlessShare']['CommonID']); ?>&nbsp;</td>
                            <td style="border:0;width:70px;text-align: right;"><?php echo $worthlessShare['WorthlessShare']['LineNo']; ?>&nbsp;</td>
                            <td style="border:0;width:105px;text-align: right;"><?php echo $worthlessShare['WorthlessShare']['CommonID']; ?>&nbsp;</td>
                            <td style="border:0;width:90px"><?php echo $worthlessShare['WorthlessShare']['OrderNo']; ?>&nbsp;</td>
                            <td style="border:0;width:90px"><?php echo $worthlessShare['WorthlessShare']['ParcelType']; ?>&nbsp;</td>
                            <td style="width:315px;border:0;font-size: 80%;text-align: left;"><?php echo $worthlessShare['WorthlessShare']['RegdName1']; ?>&nbsp;</td>
                            <td style="width:315px;border:0;font-size: 80%;"><?php echo $worthlessShare['WorthlessShare']['CompanyName']; ?>&nbsp;</td>
                            <td style="border:0;width:111px;text-align: right;"><?php echo $this->Form->input('DateDocRecd', array("style"=>"height:18px","value" => $worthlessShare['WorthlessShare']['DateDocRecd'], "label" => false, "div" => false)); ?></td>
                            <td style="border:0;width:112px;text-align: right;"><?php echo $this->Form->input('DateForConv', array("style"=>"height:18px","value" => $worthlessShare['WorthlessShare']['DateForConv'], "label" => false, "div" => false)); ?></td>
                            <td style="border:0;width:110px;text-align: right;"><?php echo $this->Form->input('DateForRego', array("style"=>"height:18px","value" => $worthlessShare['WorthlessShare']['DateForRego'], "label" => false, "div" => false)); ?></td>
                            <td style="border:0;width:90px;"><?php echo $this->Form->input('Registry', array("style"=>"height:18px","value" => $worthlessShare['WorthlessShare']['Registry'], "label" => false, "div" => false)); ?></td>
                            <td style="border:0;width:90px;"><?php echo $this->Form->input('Action', array("style"=>"height:18px","value" => $worthlessShare['WorthlessShare']['Action'], "label" => false, "div" => false)); ?></td>
                            <td style="border:0;width:90px;"><?php echo $this->Form->input('Status', array("style"=>"height:18px","value" => $worthlessShare['WorthlessShare']['Status'], "label" => false, "div" => false)); ?></td>
                            
                        </tr>
                    </table>
                    &nbsp;<?php echo $this->Html->link(__('V', true), array('action' => 'edit', $worthlessShare['WorthlessShare']['LineNo'])); ?>
                    <?php echo $this->Html->link(__('D', true), array('action' => 'delete', $worthlessShare['WorthlessShare']['LineNo']), array("style"=>"color:red"), sprintf(__('Are you sure you want to delete # %s?', true), $worthlessShare['WorthlessShare']['LineNo'])); ?>  
                    <?php $options = array('style'=>'padding:0;clear:left;float:left;margin:0','label' => 'U','name' => 'Update','div' => false);
                    echo $this->Form->end($options);?>
                </td>
            </tr>

        <?php endforeach; ?>
    </table>
    <p>
        <?php
        echo $this->Paginator->counter(array(
            'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
        ));
        ?>	</p>

    <div class="paging">
        <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class' => 'disabled')); ?>
        | 	<?php echo $this->Paginator->numbers(); ?>
        |
        <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled')); ?>
    </div>
</div>